<nz-breadcrumb class="breadcrumb-pos">
  <i nz-icon type="link" theme="outline" style="color:#1890FF;padding-right:4px"></i>
  <nz-breadcrumb-item>
    <a routerLink="/main/maintlist">维修员管理</a>
  </nz-breadcrumb-item>
  <nz-breadcrumb-item>
    编辑维修员
  </nz-breadcrumb-item>
</nz-breadcrumb>
<div class="form-div">
  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">姓名</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <input type="text" nz-input formControlName="name" placeholder="请输入姓名">
        <nz-form-explain class="checkResult" *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">
          请输入姓名!</nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="phoneNumber" nzRequired>手机号</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" [nzValidateStatus]="validateForm.controls['phoneNumber']">
        <nz-input-group [nzAddOnBefore]="addOnBeforeTemplate">
          <ng-template #addOnBeforeTemplate>
            <nz-select formControlName="phoneNumberPrefix" style="width: 70px;">
              <nz-option nzLabel="+86" nzValue="+86"></nz-option>
              <nz-option nzLabel="+87" nzValue="+87"></nz-option>
            </nz-select>
          </ng-template>
          <input nz-input formControlName="phoneNumber" id="'phoneNumber'" (blur)="checkMobile()"
            (focus)="clearCheckMobile()">
        </nz-input-group>
        <nz-form-explain class="checkResult"
          *ngIf="validateForm.get('phoneNumber').dirty && validateForm.get('phoneNumber').errors">
          <ng-container *ngIf="validateForm.get('phoneNumber').hasError('required')">
            请输入手机号!
          </ng-container>
          <ng-container *ngIf="validateForm.get('phoneNumber').hasError('confirm')">
            手机号格式不正确!
          </ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="brand">账号类型</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-input-group>
          <nz-select formControlName="type" #brand style="width: 100%;">
            <nz-option nzLabel="普通" nzValue="0"></nz-option>
            <nz-option nzLabel="管理" nzValue="1"></nz-option>
          </nz-select>
        </nz-input-group>
        <nz-form-explain class="checkResult" *ngIf="validateForm.get('type').dirty && validateForm.get('type').errors">
          请选择账号类型!</nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item nz-row style="margin-bottom:8px;">
      <nz-form-control [nzSpan]="14" [nzOffset]="6" style="text-align:center;">
        <button nz-button nzType="primary" [nzLoading]="btn_loading" (click)="editMaint()"
          style="margin-right:150px;">确认</button>
        <button nz-button nzType="primary" (click)="backPrevent()" routerLink="/main/maintlist">返回</button>
      </nz-form-control>
    </nz-form-item>
  </form>
</div>